<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>freemarker初体验</title>
    <style>
        span{
            font-size: 36px;
            color: #abcdef;
        }
    </style>
</head>
<#--获取数据-->
<h1>${slogan}</h1>
<span id="content">content</span>
<table></table>
</html>
<script>
    window.addEventListener('DOMContentLoaded',function (e) {
        let slogan = window.document.querySelector('h1').innerText.trim();
        window.document.querySelector('span').innerText = slogan;
    });
</script>